#!/usr/bin/python
# -*- coding: utf-8 -*-
#import urllib2
#from BeautifulSoup import BeautifulSoup
#import re
import MySQLdb
import codecs
#str = "gsfddf" + "ping"
#print str
db= MySQLdb.connect(host='213.252.92.10', user='root', passwd='oS0eegeL', db='test2')
db.set_character_set('utf8')
cursor= db.cursor()
#cursor.execute("SELECT * FROM `jos_vm_product`")
number = "4"
cursor.execute("INSERT INTO `jos_vm_product` (`product_id`, `vendor_id`, `product_parent_id`, `product_sku`, `product_s_desc`, `product_desc`, `product_thumb_image`, `product_full_image`, `product_publish`, `product_weight`, `product_weight_uom`, `product_length`, `product_width`, `product_height`, `product_lwh_uom`, `product_url`, `product_in_stock`, `product_available_date`, `product_availability`, `product_special`, `product_discount_id`, `ship_code_id`, `cdate`, `mdate`, `product_name`, `product_sales`, `attribute`, `custom_attribute`, `product_tax_id`, `product_unit`, `product_packaging`, `child_options`, `quantity_options`, `child_option_ids`, `product_order_levels`) VALUES ("+number+", 1, 0, '"+number+"', 'товар4','товар4', 'http://a-el.ru/img/al_b16_s.gif', 'http://www.a-el.ru/img/al_b16.jpg', 'Y', 0.0000, 'шт.', 0.0000, 0.0000, 0.0000, '??.', '', 0, 1258934400, '', 'N', 0, NULL, 1258969371, 1258969741, 'AL-B16', 0, '', '', 0, '??.', 0, 'N,N,N,N,N,Y,20%,10%,', 'none,0,0,1', '', '0,0')")
#row = cursor.fetchone()
#print row
#for x in row:	print x
cursor.execute("INSERT INTO `test2`.`jos_vm_product_category_xref` (`category_id` ,`product_id` ,`product_list`) VALUES ('2', '"+number+"', '1')") #заносим товар в категорию